<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>数据结构性质</title>
    <link rel="stylesheet" href="../css/pageDataStruct.css">
</head>
<body>
<div class="view">
    <a href="MenuComputerMath.html" class="back">back</a>
    <h1>数据结构公式</h1>
    <h2>栈</h2>
    <div class="math">1/(n+1) · C<sub>2n</sub><sup>n</sup></div>
    <div class="note">n个不同元素进栈，出栈顺序个数</div>
    <div class="note"></div>
    <h2>字符串</h2>
    <div class="math">n(n+1)/2+1</div>
    <div class="note">长度为n且不含重复字符的串，子串个数</div>
    <h2>二叉树</h2>
    <div class="math">2<sup>i</sup></div>
    <div class="note">二叉树的第i层最多结点个数</div>
    <div class="math">2<sup>h</sup> - 1</div>
    <div class="note">高度为h的二叉树上最多结点数量</div>
    <div class="note"></div>
    <h2>完全二叉树</h2>
    <div class="math">⌊log<sub>2</sub>N⌋ + 1</div>
    <div class="math">⌈log<sub>2</sub>(N+1)⌉</div>
    <div class="note">n个节点的完全二叉树深度</div>
    <div class="math">⌊(i-1)/2⌋</div>
    <div class="note">0开始编号，i节点的父亲节点</div>
    <div class="math">2i+1</div>
    <div class="note">0开始编号，i节点的左孩子</div>
    <div class="math">2i+2</div>
    <div class="note">0开始编号，i节点的右孩子</div>
    <h2>图</h2>
    <div class="math">n(n-1)/2</div>
    <div class="note">n个节点完全无向图，边的数量</div>
    <div class="math">n(n-1)</div>
    <div class="note">n个节点完全有向图，边的数量</div>
</div>
</body>
</html>
<script src="../js/mathTools.js"></script>
<script src="../js/pageDataStruct.js"></script>
